<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/mustache.js/4.0.1/mustache.min.js"></script>
</head>

<body>
    <script>
        let a = {
            data: ['a', 'b', 'c']
        }
        let str2 =
            `
    {{#data}}
        <li>{{ . }}</li>
        {{#data}}
            <li>{{ . }}</li>
        {{/data}}
    {{/data}}
`
        let template = Mustache.render(str2, a)
        console.log(template);
    </script>
</body>

</html>